import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsString } from 'class-validator';

export class CreateSmtpDto {
  @ApiProperty({ description: '接收邮件账号' })
  @IsString()
  @IsNotEmpty()
  toEmail: string;

  @ApiProperty({ description: '发送邮件账号' })
  @IsNotEmpty()
  @IsString()
  fromEmail: string;

  @ApiProperty({ description: '邮件内容' })
  @IsNotEmpty()
  @IsString()
  text: string;

  @ApiProperty({ description: '邮件主体' })
  subject?: string;
  @ApiProperty({ description: '是否发送成功' })
  isSuccess?: boolean;
}
